declare namespace OPERATION_LOG {
  /**
   * 登录日志模型
   */
  interface LoginLogModel {
    id: number;
    userId: number;
    username: string;
    loginIp: string;
    loginDevice: string;
    loginStatus: boolean; // true-成功，false-失败
    failReason: string | null;
    loginTime: string;
    logoutTime: string | null;
    sessionDuration: number; // 会话时长（秒）
    createTime?: string;
    updateTime?: string;
  }

  /**
   * 登录日志列表请求参数
   */
  interface LoginLogListParams {
    pageNum?: number;
    pageSize?: number;
    userId?: number;
    username?: string;
    loginIp?: string;
    loginDevice?: string;
    loginStatus?: boolean;
    startTime?: string;
    endTime?: string;
  }

  /**
   * 登录日志列表响应数据
   */
  interface LoginLogListResponse {
    code: number;
    message: string;
    data: {
      pageNum: number;
      pageSize: number;
      total: number;
      pages: number;
      list: LoginLogModel[];
      hasPrevious: boolean;
      hasNext: boolean;
    };
  }

  /**
   * 登录统计数据
   */
  interface LoginStatsModel {
    totalLogins: number;
    uniqueUsers: number;
    averageLoginsPerUser: number;
    successRate: number;
  }

  /**
   * 登录统计数据响应
   */
  interface LoginStatsResponse {
    code: number;
    message: string;
    data: LoginStatsModel;
  }

  /**
   * 每日登录次数项
   */
  interface DailyLoginCountItem {
    date: string;
    count: number;
  }

  /**
   * 每日登录次数响应
   */
  interface DailyLoginCountResponse {
    code: number;
    message: string;
    data: DailyLoginCountItem[];
  }
}